﻿ 
using TeachingEval.Sys.DAL;
using TeachingEval.Sys.IDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace TeachingEval.Sys.DALFactory
{
    public partial class AbstractFactory
    {        
	    public static IclassaDal CreateclassaDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".classaDal")
                as IclassaDal;
        }
	    public static IdeparcadreDal CreatedeparcadreDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".deparcadreDal")
                as IdeparcadreDal;
        }
	    public static IdepartmentDal CreatedepartmentDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".departmentDal")
                as IdepartmentDal;
        }
	    public static IevalcriteriaDal CreateevalcriteriaDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".evalcriteriaDal")
                as IevalcriteriaDal;
        }
	    public static IevalratingDal CreateevalratingDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".evalratingDal")
                as IevalratingDal;
        }
	    public static IlessonDal CreatelessonDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".lessonDal")
                as IlessonDal;
        }
	    public static ImajorDal CreatemajorDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".majorDal")
                as ImajorDal;
        }
	    public static IschcadreDal CreateschcadreDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".schcadreDal")
                as IschcadreDal;
        }
	    public static IstucadreDal CreatestucadreDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".stucadreDal")
                as IstucadreDal;
        }
	    public static IteacherDal CreateteacherDal()
        {
			string assemblyName = System.Configuration.ConfigurationManager.AppSettings["DalAssemblyName"];
            return Assembly.Load(assemblyName).CreateInstance(assemblyName + ".teacherDal")
                as IteacherDal;
        }
	}
	
}